<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			const arr = [1, 2, 3];
			arr.forEach(function(element, index, array) {
				// console.log(element);
			})

			// arr.forEach((element, index, array) => console.log(element));

			// arr.forEach(element => console.log(element));

			/* setTimeout(function() {
				console.log("博为峰")
			}, 2000); */
			
			// setTimeout(()=>console.log("博为峰"),2000)
			
			
			//this指向
			
			arr.forEach(function(element, index, array) {
				// console.log(this);
			})
			
			// arr.forEach(element => console.log(this));
			
			setTimeout(()=>console.log(this),2000)
		</script>
	</head>
	<body>
	</body>
</html>
